import { http } from "@/utils/http";
import type { PageR } from '@/types/api';

export interface PhotoVO {
  photoId: number;
  userId: number;
  uploaderName: string;
  title: string;
  description: string;
  imageUrl: string;
  shootDate: string;
  shootLocation: string;
  status: number;
  createdAt: string;
  updatedAt: string;
}

export interface PhotoGroupVO {
  shootDate: string;
  photos: PhotoVO[];
}

export const getPhotoGroupByDatePage = (params: { page?: number; size?: number }) => {
  return http.get<PageR<PhotoGroupVO[]>>('/photos/group-by-date-page', { params });
}; 